{% load doi %}
{% load i18n %}
{% load author %}
{% load statuses %}
{% for publi in paper.first_publications %}
{% if forloop.first %}
  <span class="detailsTitle">{% trans "Published in" %}</span>
  <div class="detailsContent">
{% endif %}
<p>{{ publi | publication }}</p>
{% if publi.doi %}
<p>DOI: <a href="{{ publi | doi_to_url }}">{{ publi.doi }}</a></p>
{% endif %}
{% if forloop.last %}
</div>
{% endif %}
{% endfor %}

<span class="detailsTitle">{% trans "Links" %}</span>
<div class="detailsContent">
    {% include 'papers/paperSources.html' with paper=paper %}
</div>

<span class="detailsTitle">{% trans "Tools" %}</span>
<div class="detailsContent">
    <p><a href="{{ paper.google_scholar_link }}">{% trans "Search in Google Scholar" %}</a></p>
    {% with paper.get_doi as doi %}
    {% if doi and not paper.pdf_url %}
    <p><a href="https://openaccessbutton.org/request?doi={{ doi }}">{% trans "Request with the Open Access Button" %}</a></p>
    {% endif %}
    {% endwith %}
</div>

{% if request.user.is_superuser %}
<span class="detailsTitle">{% trans "Admin zone" %}</span>
<div class="detailsContent">
    <p><strong>Fingerprint:</strong> {{ paper.plain_fingerprint }}</p>
    <p><strong>Fingerprint:</strong> <a href="http://doai.dissem.in/oai?verb=ListRecords&metadataPrefix=base_dc&set=proaixy:fingerprint:{{ paper.fingerprint }}">{{ paper.fingerprint }}</a></p>
</div>
{% endif %}

